<template>
    <div>
    <title-bar :title="titleText"/>
    <div class="wrapper" :style="{height:deviceHeight}">
      <text class="text" @click="getAndroidInterFaceData">{{buttonText}}</text>
    </div>
    </div>
</template>
<script>
import TitleBar from "../components/TitleBar";
var test = weex.requireModule("test");
import { toast } from "../utils/config";
export default {
  components: {
    TitleBar
  },
  data: {
    titleText: "Android接口",
    buttonText: "获取Android信息",
    deviceHeight: weex.config.env.deviceHeight / 2
  },
  methods: {
    getAndroidInterFaceData() {
      test.getTestData(event => {
        toast(event);
      });
    }
  }
};
</script>
<style scoped>
.wrapper {
  align-items: center;
  justify-content: center;
}
.text {
  width: 400px;
  height: 80px;
  border-radius: 5px;
  background-color: #3eaf7c;
  font-size: 48px;
  color: #fff;
  padding: 10px;
  text-align: center;
}
</style>
